package kyuuri.server;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class NicoLive {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private String guid;
	@Persistent
	private String title;
	@Persistent
	private Date pubDate;
	@Persistent
	private String description;
	@Persistent
	private String category;
	@Persistent
	private String thumnail;
	@Persistent
	private String creator;
	@Persistent
	private String communityName;
	@Persistent
	private String communityId;
	@Persistent
	private int numRes;
	@Persistent
	private int view;
	@Persistent
	private boolean memberOnly;
	@Persistent
	private String type;
	@Persistent
	private String ownerName;
	@Persistent
	private boolean broadcasting;

	public NicoLive(String guid) {
		this.guid = guid;
	}
	
	public NicoLive(String guid, String title, Date pubDate, int view) {
		this.guid = guid;
		this.title = title;
		this.pubDate = pubDate;
		this.view = view;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getThumnail() {
		return thumnail;
	}

	public void setThumnail(String thumnail) {
		this.thumnail = thumnail;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getCommunityName() {
		return communityName;
	}

	public void setCommunityName(String communityName) {
		this.communityName = communityName;
	}

	public String getCommunitiId() {
		return communityId;
	}

	public void setCommunityId(String communityId) {
		this.communityId = communityId;
	}

	public int getNumRes() {
		return numRes;
	}

	public void setNumRes(int numRes) {
		this.numRes = numRes;
	}

	public boolean isMemberOnly() {
		return memberOnly;
	}

	public void setMemberOnly(boolean memberOnly) {
		this.memberOnly = memberOnly;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getOwnerName() {
		return ownerName;
	}

	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}

	public boolean isBroadcasting() {
		return broadcasting;
	}

	public void setBroadcasting(boolean broadcasting) {
		this.broadcasting = broadcasting;
	}

	// Accessors for the fields.  JDO doesn't use these, but your application does.
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Date getPubDate() {
		return pubDate;
	}
	public void setPubDate(Date pubDate) {
		this.pubDate = pubDate;
	}
	public int getView() {
		return view;
	}
	public void setView(int view) {
		this.view = view;
	}

	public String getCommunityId() {
		return communityId;
	}
}
